<template>

  <a-input-search
      v-model:value="searchValue"
      v-bind:loading="searchLoading"
      enter-button
      @search="search"
      style="padding-top: 8px"
  />

</template>

<script setup>

import request from "@/utils/request";
import store from "@/store";
import {ref} from "vue";


const searchValue=ref("")
const searchLoading=ref(false)


const search=()=> {
  searchLoading.value = true
  request.get("essay/getset/bytitle/" + searchValue.value).then(res => {
    console.log(res)
    store.commit("setSearchSet",res.data)
    searchLoading.value=false
  })
}
</script>